package C621;

/**
 * @program: javase
 * @description:
 * @author: luolidong
 * @create: 2021-06-21 14:49
 * @version: 1.0
 */
public class C3 implements T3{
    private static final int i;
     static {
        i=9;
    }
    @Override
    public void t1() {

    }

    @Override
    public void t3() {

    }

    @Override
    public void t2() {

    }

    public void t4(){
        System.out.println("t4");
    }

    public static void main(String[] args) {
        T3 c3 = new C3();//接口的回调
        System.out.println("c3.i = " + c3.i );
        System.out.println("new C3().i = " + new C3().i );
//        如果要访问新增的方法，需要类型转换
        ((C3)c3).t4();
    }
}
